﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Suanhua_SingleImport : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        DBOperator dbo = new DBOperator();        

        string JH = TextBox1.Text;
        string JB = RadioButtonList1.SelectedValue;
        string CSLB = "1200";
        string KGRQ = TextBox2.Text;
        string WGRQ = TextBox3.Text;
        string CSMC = DropDownList1.SelectedValue;
        string SGFS = DropDownList2.SelectedValue;
        string CSCD = TextBox6.Text;
        decimal SHBJ;
        decimal.TryParse(TextBox7.Text,out SHBJ);
        string BZ = TextBox8.Text;

        SuanhuaRecord shr = new SuanhuaRecord(JH,JB,CSLB,KGRQ,WGRQ,CSMC,SGFS,CSCD,BZ,SHBJ);
        //单条记录录入数据库
        result_lbl.Text = dbo.SingleImport(shr);
        
        //Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('单条数据录入成功!');</script>");
    }
}